﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BUS;
using ENTITY;
using System.Data;

public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
    {
        

    }
    protected void Login1_LoggingIn(object sender, LoginCancelEventArgs e)
    {
        //EntAccount entity = new EntAccount();
        //entity.Username = Login1.UserName;
        //entity.Password = Login1.Password;
        //ABusLogin login = new ABusLogin();
        //DataTable dt = login.Login(entity);
        //if (dt.Rows.Count == 0)
        //{
        //    lable_default.Text = "Tài khoản không tồn tại.";
        //}
        //else
        //{
        //    if (dt.Rows[0].ItemArray[0] == entity.Username && dt.Rows[0].ItemArray[1] == entity.Password)
        //    {
        //        if (entity.Permission == 1)
        //        {
        //            Response.Redirect("~/Admin/AdminPage.aspx");
        //        }
        //        else if (entity.Permission == 2)
        //        {
        //            Response.Redirect("~/Manager/Manager.aspx");
        //        }
        //        else
        //            lable_default.Text = "Xin Chào " + entity.Username;
        //    }

        //}
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        this.lable_default.Text = "adfadfadfasdfadf";
    }
}
